const express = require('express');
const expressStatic = require('express-static');
const bodyParser = require("body-parser");

const server = express();
server.listen(8080);

server.use(bodyParser.urlencoded({
  extented:false
}));
server.get('/login',function (req,res,next) {
   var message  = req.query;
   res.send('ok');
   res.end();
   return next();
});
server.post('/login',function(req,res,next){
    var message  = req.body;
    console.log(message);
    res.send('ok');
    res.end();
    return next();

});
server.use(expressStatic('./www'));
